home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / dbms_mag / 9108 / account1.aug next >
Text File  |  1991-06-13  |  1KB  |  50 lines

  1.  
  2. Listing 1: 
  3.  
  4. PROCEDURE qfrac           
  5. *
  6. PRIVATE usr_inp
  7. @ 23,0
  8. IF TYPE("no_bal_msg")<> "L"
  9.    PRIVATE no_bal_msg
  10.    STORE .F. TO no_bal_msg
  11. ENDIF
  12. IF no_bal_msg
  13.    usr_inp = "F "
  14. ELSE
  15.    SET COLOR TO &vid_rvrs
  16.    IF rmng_2_bal = 0
  17.       ?? "Distribution is in balance"
  18.       usr_inp = "F "
  19.    ELSE
  20.       ?? "Distribution is not in balance",CHR(7)
  21.       usr_inp = IIF(last_item = 0,"A ","R ")
  22.    ENDIF
  23.    SET COLOR TO &vid_nrml
  24. ENDIF
  25. c_frac = 0
  26. DO WHILE c_frac = 0
  27.    @ 22,0
  28.    @ 22,0 SAY "File, Review, Append, Cancel (F/R/A/C) " ;
  29.       GET usr_inp PICTURE "!!"
  30.    READ
  31.    key_press = keypress()
  32.    DO CASE
  33.    CASE  usr_inp = "/" .OR. key_press = 12    && Esc
  34.       c_frac = -1
  35.    CASE  usr_inp = "F" .OR. usr_inp = "1"
  36.       c_frac = 1
  37.    CASE  usr_inp = "R" .OR. usr_inp = "2"
  38.       c_frac = 2
  39.    CASE  usr_inp = "A" .OR. usr_inp = "3"
  40.       c_frac = 3
  41.    CASE  usr_inp = "C" .OR. usr_inp = "4"
  42.       c_frac = 4
  43.    ENDCASE
  44.    usr_inp = "  "
  45. ENDDO
  46. @ 22,0 CLEAR
  47. *
  48. RETURN                    
  49.  
  50.